package com.fzj.charging.common.pojo.day1121;

public class Demo1128 {
    public static void main(String[] args) {
        int i = 1;
        int sum = 0;
        int flag = 1;
        while (i<102){
            sum = sum +  flag * i;
            i+=2;
            flag = -1 * flag;
        }
        System.out.println(sum);
    }
}
